<!-- HTML header for doxygen 1.8.3.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>Sifteo SDK: Sifteo::System Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-style-overrides.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<center>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Sifteo SDK" src="sdk_logo.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">
   &#160;<span id="projectnumber">v1.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
</center>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Home</span></a></li>
      <li><a href="pages.html"><span>Guides</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>Sifteo</b></li><li class="navelem"><a class="el" href="class_sifteo_1_1_system.html">System</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="class_sifteo_1_1_system-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Sifteo::System Class Reference<div class="ingroups"><a class="el" href="group__system.html">System</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Global operations that apply to the system as a whole.  
 <a href="class_sifteo_1_1_system.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="system_8h_source.html">sifteo/system.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a367fbb9a7e47b12d8a63915899b07568"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a367fbb9a7e47b12d8a63915899b07568">abort</a> ()</td></tr>
<tr class="memdesc:a367fbb9a7e47b12d8a63915899b07568"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exit with a fault, for fatal error handling.  <a href="#a367fbb9a7e47b12d8a63915899b07568">More...</a><br/></td></tr>
<tr class="separator:a367fbb9a7e47b12d8a63915899b07568"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02b6ff38d7e7e672e941bb8ea4182b3b"><td class="memItemLeft" align="right" valign="top">static float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a02b6ff38d7e7e672e941bb8ea4182b3b">batteryLevel</a> ()</td></tr>
<tr class="memdesc:a02b6ff38d7e7e672e941bb8ea4182b3b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the system's battery level.  <a href="#a02b6ff38d7e7e672e941bb8ea4182b3b">More...</a><br/></td></tr>
<tr class="separator:a02b6ff38d7e7e672e941bb8ea4182b3b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a683428ced5823dbade4077eae34fe865"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a683428ced5823dbade4077eae34fe865">exit</a> ()</td></tr>
<tr class="memdesc:a683428ced5823dbade4077eae34fe865"><td class="mdescLeft">&#160;</td><td class="mdescRight">Leave the game immediately.  <a href="#a683428ced5823dbade4077eae34fe865">More...</a><br/></td></tr>
<tr class="separator:a683428ced5823dbade4077eae34fe865"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36d92c44328916f60f62abf63d2ee7bd"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a36d92c44328916f60f62abf63d2ee7bd">finish</a> ()</td></tr>
<tr class="memdesc:a36d92c44328916f60f62abf63d2ee7bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for any previous <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a> to finish.  <a href="#a36d92c44328916f60f62abf63d2ee7bd">More...</a><br/></td></tr>
<tr class="separator:a36d92c44328916f60f62abf63d2ee7bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad99576978bcc107d064aaf466cbaaae"><td class="memItemLeft" align="right" valign="top">static uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#aad99576978bcc107d064aaf466cbaaae">hardwareVersion</a> ()</td></tr>
<tr class="memdesc:aad99576978bcc107d064aaf466cbaaae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the hardware revision for the Sifteo base this application is running on.  <a href="#aad99576978bcc107d064aaf466cbaaae">More...</a><br/></td></tr>
<tr class="separator:aad99576978bcc107d064aaf466cbaaae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1cd0bb2448968b094fccf9aae9691992"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a1cd0bb2448968b094fccf9aae9691992">isDebug</a> ()</td></tr>
<tr class="memdesc:a1cd0bb2448968b094fccf9aae9691992"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this a debug build?  <a href="#a1cd0bb2448968b094fccf9aae9691992">More...</a><br/></td></tr>
<tr class="separator:a1cd0bb2448968b094fccf9aae9691992"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed1f21c2ec94d82e782adfb384b35e6a"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#aed1f21c2ec94d82e782adfb384b35e6a">isSimDebug</a> ()</td></tr>
<tr class="memdesc:aed1f21c2ec94d82e782adfb384b35e6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is this a debug build running in simulation?  <a href="#aed1f21c2ec94d82e782adfb384b35e6a">More...</a><br/></td></tr>
<tr class="separator:aed1f21c2ec94d82e782adfb384b35e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7316e95e241754c58f55c761dbd3c1d1"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a7316e95e241754c58f55c761dbd3c1d1">keepAwake</a> ()</td></tr>
<tr class="memdesc:a7316e95e241754c58f55c761dbd3c1d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent the system from shutting down due to inactivity.  <a href="#a7316e95e241754c58f55c761dbd3c1d1">More...</a><br/></td></tr>
<tr class="separator:a7316e95e241754c58f55c761dbd3c1d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed6a6aceb127578d8c9181325b01119d"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#aed6a6aceb127578d8c9181325b01119d">osVersion</a> ()</td></tr>
<tr class="memdesc:aed6a6aceb127578d8c9181325b01119d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the system's operating system version.  <a href="#aed6a6aceb127578d8c9181325b01119d">More...</a><br/></td></tr>
<tr class="separator:aed6a6aceb127578d8c9181325b01119d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3676c1bc1e5891a686d2646d0ec516c6"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6">paint</a> ()</td></tr>
<tr class="memdesc:a3676c1bc1e5891a686d2646d0ec516c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw the next frame.  <a href="#a3676c1bc1e5891a686d2646d0ec516c6">More...</a><br/></td></tr>
<tr class="separator:a3676c1bc1e5891a686d2646d0ec516c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad55a6655ab46fcf2a2d083b38b16ce3e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#ad55a6655ab46fcf2a2d083b38b16ce3e">paintUnlimited</a> ()</td></tr>
<tr class="memdesc:ad55a6655ab46fcf2a2d083b38b16ce3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw the next frame, without an upper limit on frame rate.  <a href="#ad55a6655ab46fcf2a2d083b38b16ce3e">More...</a><br/></td></tr>
<tr class="separator:ad55a6655ab46fcf2a2d083b38b16ce3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a551bacdfb105214464f619940af15956"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a551bacdfb105214464f619940af15956">setCubeRange</a> (unsigned minimum, unsigned maximum)</td></tr>
<tr class="memdesc:a551bacdfb105214464f619940af15956"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the range of cubes supported.  <a href="#a551bacdfb105214464f619940af15956">More...</a><br/></td></tr>
<tr class="separator:a551bacdfb105214464f619940af15956"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad820fc7af23749ddf0f58a52f63d602e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad820fc7af23749ddf0f58a52f63d602e"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#ad820fc7af23749ddf0f58a52f63d602e">setCubeRange</a> (unsigned count)</td></tr>
<tr class="memdesc:ad820fc7af23749ddf0f58a52f63d602e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper to specify a cube range with identical minimum and maximum counts. <br/></td></tr>
<tr class="separator:ad820fc7af23749ddf0f58a52f63d602e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a6ca5647030ec4510048b664c45d658"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#a0a6ca5647030ec4510048b664c45d658">shutdown</a> (bool now=false)</td></tr>
<tr class="memdesc:a0a6ca5647030ec4510048b664c45d658"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shut down the system.  <a href="#a0a6ca5647030ec4510048b664c45d658">More...</a><br/></td></tr>
<tr class="separator:a0a6ca5647030ec4510048b664c45d658"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3c6ac3aa37edcec5196035c3832f420"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sifteo_1_1_system.html#ab3c6ac3aa37edcec5196035c3832f420">yield</a> ()</td></tr>
<tr class="memdesc:ab3c6ac3aa37edcec5196035c3832f420"><td class="mdescLeft">&#160;</td><td class="mdescRight">Temporarily give up control of the CPU.  <a href="#ab3c6ac3aa37edcec5196035c3832f420">More...</a><br/></td></tr>
<tr class="separator:ab3c6ac3aa37edcec5196035c3832f420"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Global operations that apply to the system as a whole. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a367fbb9a7e47b12d8a63915899b07568"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::abort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Exit with a fault, for fatal error handling. </p>
<p>This is the same kind of fatal error that occurs when an <a class="el" href="group__macros.html#ga8a15779356736a0900a162442b1cda53" title="Runtime debug assertion.">ASSERT()</a> fails. </p>

</div>
</div>
<a class="anchor" id="a02b6ff38d7e7e672e941bb8ea4182b3b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static float Sifteo::System::batteryLevel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the system's battery level. </p>
<p>The battery level has already been converted into a "fuel gauge" representation, with 0.0f representing a qualitatively dead battery and 1.0f representing a totally new battery.</p>
<p>A reading of exactly zero will only result when the battery level is not yet known. This is only relevant to code which can run very soon after the system boots.</p>
<p>To get the battery level for a single cube, call <a class="el" href="struct_sifteo_1_1_cube_i_d.html#adf7619787645fad6e523d8f3e5bb8e59" title="Get this cube&#39;s battery level.">CubeID::batteryLevel()</a>. </p>

</div>
</div>
<a class="anchor" id="a683428ced5823dbade4077eae34fe865"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::exit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Leave the game immediately. </p>
<p>Returns control back to the main menu. Equivalent to returning from main(). </p>

</div>
</div>
<a class="anchor" id="a36d92c44328916f60f62abf63d2ee7bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::finish </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Wait for any previous <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a> to finish. </p>
<p>This is analogous to glFinish() in OpenGL. It doesn't enqueue any new rendering, but the caller has a strong guarantee that all existing rendering has completed by the time this function returns.</p>
<p>This function must be used if you're changing VRAM after rendering a frame, and you must make absolutely sure that this change doesn't affect the current frame. For example, if you're making a sharp transition from one video mode to a totally different one.</p>
<p>Typically you should call <a class="el" href="class_sifteo_1_1_system.html#a36d92c44328916f60f62abf63d2ee7bd" title="Wait for any previous paint() to finish.">finish()</a> <em>before</em> an event that changes the video mode or the BG1 mask.</p>
<p>Don't overuse <a class="el" href="class_sifteo_1_1_system.html#a36d92c44328916f60f62abf63d2ee7bd" title="Wait for any previous paint() to finish.">finish()</a>, especially not if you're concerned with frame rate. Normally it's desirable to be working on building the next frame while the cubes are still busy rendering the previous one.</p>
<p>Unlike <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a> and <a class="el" href="class_sifteo_1_1_system.html#ab3c6ac3aa37edcec5196035c3832f420" title="Temporarily give up control of the CPU.">yield()</a>, finish does <em>not</em> dispatch <a class="el" href="namespace_sifteo_1_1_events.html" title="Namespace of all available event vectors.">Sifteo::Events</a> handler functions. </p>

</div>
</div>
<a class="anchor" id="aad99576978bcc107d064aaf466cbaaae"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint8_t Sifteo::System::hardwareVersion </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the hardware revision for the Sifteo base this application is running on. </p>
<dl class="section note"><dt>Note</dt><dd>early OS versions do not support the _SYS_version() syscall - _SYS_HW_VERSION_NONE is returned in this case. </dd></dl>

</div>
</div>
<a class="anchor" id="a1cd0bb2448968b094fccf9aae9691992"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool Sifteo::System::isDebug </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is this a debug build? </p>
<p>Returns 'true' if slinky was invoked with '-g', or false otherwise. </p>

</div>
</div>
<a class="anchor" id="aed1f21c2ec94d82e782adfb384b35e6a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool Sifteo::System::isSimDebug </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Is this a debug build running in simulation? </p>
<p>Returns 'true' if slinky was invoked with '-g' and we're running in siftulator rather than on real hardware. Returns false otherwise.</p>
<p>Release builds cannot detect being run in Siftulator in this manner. On release buids, this function always returns false. </p>

</div>
</div>
<a class="anchor" id="a7316e95e241754c58f55c761dbd3c1d1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::keepAwake </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Prevent the system from shutting down due to inactivity. </p>
<p>By default, the system shuts down automatically after 10 minutes of inactivity - no touch or neighbor events. If an app wants to keep running, and does not expect to generate any neighbor or touch events during normal operation, <a class="el" href="class_sifteo_1_1_system.html#a7316e95e241754c58f55c761dbd3c1d1" title="Prevent the system from shutting down due to inactivity.">keepAwake()</a> resets the timeout countdown. </p>

</div>
</div>
<a class="anchor" id="aed6a6aceb127578d8c9181325b01119d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t Sifteo::System::osVersion </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the system's operating system version. </p>
<p>The version is a numeric value of the form 0xMMNNPP (MM = major, NN = minor, PP = patch).</p>
<p>For example, if your application is running on a system at version <b>1.5.10</b>, the value from <a class="el" href="class_sifteo_1_1_system.html#aed6a6aceb127578d8c9181325b01119d" title="Returns the system&#39;s operating system version.">osVersion()</a> will be <b>0x010510</b>.</p>
<dl class="section note"><dt>Note</dt><dd>early OS versions do not support the _SYS_version() syscall - _SYS_OS_VERSION_NONE is returned in this case. </dd></dl>

</div>
</div>
<a class="anchor" id="a3676c1bc1e5891a686d2646d0ec516c6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::paint </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Draw the next frame. </p>
<p>Draws simultaneously on all enabled and connected cubes.</p>
<p>This function includes flow control. If the game is rendering faster than the cubes are, this function automatically yields to keep the game's frame rate in sync with the cube frame rate.</p>
<p>This function can very cheaply determine whether any changes in fact occurred on a cube. If nothing changed, we won't redraw that cube. If no cubes need drawing, this function yields for the duration of one frame.</p>
<p>Handlers registered with <a class="el" href="namespace_sifteo_1_1_events.html" title="Namespace of all available event vectors.">Sifteo::Events</a> may be dispatched immediately prior to returning from <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a>. </p>

</div>
</div>
<a class="anchor" id="ad55a6655ab46fcf2a2d083b38b16ce3e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::paintUnlimited </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Draw the next frame, without an upper limit on frame rate. </p>
<p>Normally <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a> includes various forms of throttling which prevent the game from rendering faster than the LCD can display frames, or faster than the cube can keep up. Because of this, a normal <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a> includes two phases: waiting for time to paint, then triggering a paint on all cubes.</p>
<p>This variant of <a class="el" href="class_sifteo_1_1_system.html#a3676c1bc1e5891a686d2646d0ec516c6" title="Draw the next frame.">paint()</a> skips the former step. We immediately trigger a render on all cubes, without regard to putting any explicit upper limits on the rate at which we're completing frames.</p>
<p>Handlers registered with <a class="el" href="namespace_sifteo_1_1_events.html" title="Namespace of all available event vectors.">Sifteo::Events</a> may be dispatched immediately prior to returning from <a class="el" href="class_sifteo_1_1_system.html#ad55a6655ab46fcf2a2d083b38b16ce3e" title="Draw the next frame, without an upper limit on frame rate.">paintUnlimited()</a>. </p>

</div>
</div>
<a class="anchor" id="a551bacdfb105214464f619940af15956"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::setCubeRange </td>
          <td>(</td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>minimum</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&#160;</td>
          <td class="paramname"><em>maximum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the range of cubes supported. </p>
<p>When the number of cubes connected to the system drops below <code>minimum</code>, the system pauses execution until the requisite number of cubes are connected, or the user decides to quit.</p>
<p>When the number of cubes connected to the system is greater than <code>maximum</code>, extra cubes will not be reported as connected to userspace. NOTE: the behavior for cubes in this limbo state has not been fully specified.</p>
<p>In many cases, it is not required to call <a class="el" href="class_sifteo_1_1_system.html#a551bacdfb105214464f619940af15956" title="Set the range of cubes supported.">setCubeRange()</a> explicitly - including a call to <a class="el" href="class_sifteo_1_1_metadata.html#a2d826282b065cca709e9c49d6a6e47a4" title="Set the minimum and maximum number of supported cubes for this game.">Metadata::cubeRange()</a> is sufficient to set the default cube range for the app. During execution, <a class="el" href="class_sifteo_1_1_system.html#a551bacdfb105214464f619940af15956" title="Set the range of cubes supported.">setCubeRange()</a> can be used to dynamically configure the number of cubes.</p>
<dl class="section note"><dt>Note</dt><dd>Calling <a class="el" href="class_sifteo_1_1_system.html#a551bacdfb105214464f619940af15956" title="Set the range of cubes supported.">setCubeRange()</a> when the number of cubes connected to the system is below the new <code>minimum</code> will trigger a pause immediately until the required cubes are connected. </dd></dl>

</div>
</div>
<a class="anchor" id="a0a6ca5647030ec4510048b664c45d658"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::shutdown </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>now</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Shut down the system. </p>
<p>This initiates a shutdown sequence. By default, this will pause the game and present the system's standard shutdown UI. If shutdown is cancelled, this function returns. Otherwise, the base shuts down immediately and this function will not return.</p>
<p>Games may elect to use this to shut down during periods of inactivity, such as if the user leaves a menu idle for a while.</p>
<p>If the 'now' flag is true, the UI is bypassed and we shut down immediately. </p>

</div>
</div>
<a class="anchor" id="ab3c6ac3aa37edcec5196035c3832f420"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Sifteo::System::yield </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Temporarily give up control of the CPU. </p>
<p>During a <a class="el" href="class_sifteo_1_1_system.html#ab3c6ac3aa37edcec5196035c3832f420" title="Temporarily give up control of the CPU.">yield()</a>, event callbacks may run. If the system as a whole has nothing better to do, the CPU will be put into a lower-power mode until some kind of event occurs.</p>
<p><a class="el" href="class_sifteo_1_1_system.html#ab3c6ac3aa37edcec5196035c3832f420" title="Temporarily give up control of the CPU.">yield()</a> may return at any time, including immediately after it's called. There is no guarantee that any particular event will have occurred before it returns.</p>
<p>Handlers registered with <a class="el" href="namespace_sifteo_1_1_events.html" title="Namespace of all available event vectors.">Sifteo::Events</a> may be dispatched immediately prior to returning from <a class="el" href="class_sifteo_1_1_system.html#ab3c6ac3aa37edcec5196035c3832f420" title="Temporarily give up control of the CPU.">yield()</a>. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="system_8h_source.html">system.h</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.3.1-->
<!-- start footer part -->
    <hr class="footer"/>
    <address class="footer">
        <p><a href="http://sifteo.com">Sifteo</a> SDK v1.0.0 <small>(see <a href="https://developers.sifteo.com/sifteosdk">all versions</a>)</small></p>
        <p>Last updated Wed Mar 27 2013, by <a href="http://www.stack.nl/~dimitri/doxygen">Doxygen</a></p>
    </address>
</body>
</html>
